<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Symbol</title>
</head>
<body>
<script>
  //symbol新的数据类型，第七种数据类型
  //唯一的，解决命名冲突的问题

  //创建symbol
  let s = Symbol();
  console.log(s,typeof s);

  let s2 = Symbol('mask');
  let s3 = Symbol('mask');
  console.log(s2 === s3);

  //Symbol.for创建
  let s4 = Symbol.for('mask');
  let s5 = Symbol.for('mask');
  console.log(s4,typeof s4);
  console.log(s4 === s5);

  //不能与其他数据进行运算
  let result = s + 100;

  //USONB you are so niubility
  //u undefined
  //s string symbol
  //o object
  //n null number
  //b boolean

</script>
</body>
</html>